﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using NetDon.OA.Data.HelperClasses;
using NetDon.OA.Interface.eLogistics;

namespace NetDon.OA.Interface
{
    public interface IRevenueMachineAccountService
    {
        int GetRevenueMachineAccountsCount(RevenueMachineAccountSearchCriteria criteria);
        DataTable SearchRevenueMachineAccountDataByCondition(RevenueMachineAccountSearchCriteria criteria,
           string sortExpression, SortDirection sortDirection, int pageSize, int pageIndex);

        bool AddRevenueMachineAccount(Transaction trans, RevenueMachineAccountData entity);
        bool ModifyRevenueMachineAccount(RevenueMachineAccountData entity);
        bool BatchModifyRevenueMachineAccounts(IList<RevenueMachineAccountData> revenueMachineAccounts);
        bool RemoveRevenueMachineAccount(Guid revenueMachineAccountId);

        RevenueMachineAccountData GetRevenueMachineAccount(Guid revenueMachineAccountId, bool isSimpleView);
        bool ExistsRevenueMachineAccount(Guid issuingOrderDeliveryId);
        bool ExistsRevenueMachineAccountByIssuingOrder(Guid issuingOrderId);

        //invoice
        int GetRevenueMachineAccountInvoicesCount(RevenueMachineAccountInvoiceSearchCriteria criteria);

        DataTable SearchRevenueMachineAccountInvoiceByCondition(RevenueMachineAccountInvoiceSearchCriteria criteria,
                                                                string sortExpression, SortDirection sortDirection,
                                                                int pageSize, int pageIndex);

        RevenueMachineAccountInvoiceData GetRevenueMachineAccountInvoice(Guid revenueMachineAccountId);
        bool RemoveRevenueMachineAccountInvoices(Guid id);

        DataTable GetRevenueMachineAccountInvoiceOrders(Guid revenueMachineAccountInvoiceId);
        DataTable GetRevenueMachineAccountForInvoices(RevenueMachineAccountForInvoiceSearchCriteria criteria);
        bool ModifyRevenueMachineAccountInvoice(RevenueMachineAccountInvoiceData entity);
        bool AddRevenueMachineAccountInvoice(RevenueMachineAccountInvoiceData entity);

         RevenueMachineAccountData GetRevenueMachineAccount(Guid issuingOrderId);
        //account receipt

        IEnumerable<RevenueMachineAccountInvoiceReceiptData> GetRevenueMachineAccountInvoiceReceipts(
            Guid revenueMachineAccountInvoiceId);

         IEnumerable<RevenueMachineAccountInvoiceReceiptData> GetRevenueMachineAccountInvoiceReceipts(
            Guid? revenueMachineAccountInvoiceId, RevenueMachineAccountInvoiceReceiptsSearchCriteria criteria);

        RevenueMachineAccountInvoiceReceiptData GetRevenueMachineAccountInvoiceReceipt(Guid revenueMachineAccountInvoiceId);

        bool RemoveRevenueMachineAccountReceipt(Guid revenueMachineAccountInvoiceId);

        bool ConfirmRevenueMachineAccountInvoice(Guid revenueMachineAccountInvoiceId);


        bool IsRevenueMachineAccountInvoiceExists(Guid issuingOrderId);



        //report

        DataTable SearchRevenueMachineAccountDataByConditionForReport(RevenueMachineAccountSearchCriteria criteria,
                                                                      string sortExpression,
                                                                      System.Web.UI.WebControls.SortDirection
                                                                          sortDirection, int pageSize, int pageIndex);

        DataTable SearchRevenueMachineAccountInvoiceByConditionForReport(
            RevenueMachineAccountInvoiceSearchCriteria criteria, string sortExpression, SortDirection sortDirection,
            int pageSize, int pageIndex);

        DataTable SearchRevenueMachineAccountProfitByConditionForReport(RevenueMachineAccountSearchCriteria criteria,
                                                                        string sortExpression,
                                                                        SortDirection sortDirection, int pageSize,
                                                                        int pageIndex);
    }
}
